export interface BasicPageParams {
  pageNum: number;
  pageSize: number;
}

export interface BasicHttpSendData<T = object | string | number> {
  time?: Date;
  code?: number;
  msg?: string;
  path?: string;
  success?: boolean;
  data: T;
  [key: string]: any;
}

export interface BasicFetchResult<T> extends BasicHttpSendData {
  rows: T[];
  // list: T[];
  // result: T[];
  total: number;
}

/**
 * @description: Basic admin page parameters
 */
export interface BasicPageParams {
  pageNum: number;
  pageSize: number;
}

/**
 * @description: Basic admin http return value
 */
export interface BasicHttpSendData<T = object | string | number> {
  time?: Date;
  code?: number;
  msg?: string;
  path?: string;
  success?: boolean;
  data: T;
}

/**
 * @description: Basic admin list return value
 */
export interface BasicFetchResult<T> extends BasicHttpSendData {
  rows: T[];
  // list: T[];
  // result: T[];
  total: number;
}

/**
 * @description: Asynchronous basic admin list return value
 */
export interface AsyncBasicFetchResult<T = any> extends Promise<BasicFetchResult<T>> {}

/**
 * @description: Asynchronous basic admin http return value
 */
export interface AsyncBasicHttpSendData<T = object | string | number>
  extends Promise<BasicHttpSendData<T>> {}
